//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.reservation.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;
import java.util.stream.Collectors;

public class BookingListData implements PickableBean {
    public static final String FN_SERVICES = "services";
    public static final String FN_SHOPNAMELIST = "shopNameList";
    public static final String FN_DATELIST = "dateList";
    public static final String FN_TIMELIST = "timeList";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"services", "shopNameList", "dateList", "timeList"});
    private List<String> services;
    private List<String> shopNameList;
    private List<String> dateList;
    private List<String> timeList;

    public BookingListData(List<String> services, List<String> shopNameList, List<String> dateList, List<String> timeList) {
        this.setServices(services);
        this.setShopNameList(shopNameList);
        this.setDateList(dateList);
        this.setTimeList(timeList);
    }

    public BookingListData() {
    }

    public BookingListData duplicate() {
        BookingListData result = new BookingListData();
        result.services = this.services == null ? null : (List)this.services.stream().map((e1) -> {
            return e1;
        }).collect(Collectors.toList());
        result.shopNameList = this.shopNameList == null ? null : (List)this.shopNameList.stream().map((e2) -> {
            return e2;
        }).collect(Collectors.toList());
        result.dateList = this.dateList == null ? null : (List)this.dateList.stream().map((e3) -> {
            return e3;
        }).collect(Collectors.toList());
        result.timeList = this.timeList == null ? null : (List)this.timeList.stream().map((e4) -> {
            return e4;
        }).collect(Collectors.toList());
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public List<String> getServices() {
        if (this.services == null) {
            this.services = Lists.newArrayList();
        }

        return this.services;
    }

    public void setServices(List<String> value) {
        this.services = value;
    }

    public BookingListData withServices(List<String> value) {
        this.setServices(value);
        return this;
    }

    public BookingListData withServices(List<String> value, List<String> defaultValue) {
        this.setServices(value == null ? defaultValue : value);
        return this;
    }

    public BookingListData addServices(String value) {
        if (this.services == null) {
            this.services = Lists.newArrayList();
        }

        this.services.add(value);
        return this;
    }

    public List<String> getShopNameList() {
        if (this.shopNameList == null) {
            this.shopNameList = Lists.newArrayList();
        }

        return this.shopNameList;
    }

    public void setShopNameList(List<String> value) {
        this.shopNameList = value;
    }

    public BookingListData withShopNameList(List<String> value) {
        this.setShopNameList(value);
        return this;
    }

    public BookingListData withShopNameList(List<String> value, List<String> defaultValue) {
        this.setShopNameList(value == null ? defaultValue : value);
        return this;
    }

    public BookingListData addShopNameList(String value) {
        if (this.shopNameList == null) {
            this.shopNameList = Lists.newArrayList();
        }

        this.shopNameList.add(value);
        return this;
    }

    public List<String> getDateList() {
        if (this.dateList == null) {
            this.dateList = Lists.newArrayList();
        }

        return this.dateList;
    }

    public void setDateList(List<String> value) {
        this.dateList = value;
    }

    public BookingListData withDateList(List<String> value) {
        this.setDateList(value);
        return this;
    }

    public BookingListData withDateList(List<String> value, List<String> defaultValue) {
        this.setDateList(value == null ? defaultValue : value);
        return this;
    }

    public BookingListData addDateList(String value) {
        if (this.dateList == null) {
            this.dateList = Lists.newArrayList();
        }

        this.dateList.add(value);
        return this;
    }

    public List<String> getTimeList() {
        if (this.timeList == null) {
            this.timeList = Lists.newArrayList();
        }

        return this.timeList;
    }

    public void setTimeList(List<String> value) {
        this.timeList = value;
    }

    public BookingListData withTimeList(List<String> value) {
        this.setTimeList(value);
        return this;
    }

    public BookingListData withTimeList(List<String> value, List<String> defaultValue) {
        this.setTimeList(value == null ? defaultValue : value);
        return this;
    }

    public BookingListData addTimeList(String value) {
        if (this.timeList == null) {
            this.timeList = Lists.newArrayList();
        }

        this.timeList.add(value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -2077603573:
                if (name.equals("timeList")) {
                    var3 = 3;
                }
                break;
            case 755649247:
                if (name.equals("shopNameList")) {
                    var3 = 1;
                }
                break;
            case 1379209310:
                if (name.equals("services")) {
                    var3 = 0;
                }
                break;
            case 1792511340:
                if (name.equals("dateList")) {
                    var3 = 2;
                }
        }

        switch(var3) {
            case 0:
                return this.getServices();
            case 1:
                return this.getShopNameList();
            case 2:
                return this.getDateList();
            case 3:
                return this.getTimeList();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -2077603573:
                if (name.equals("timeList")) {
                    var4 = 3;
                }
                break;
            case 755649247:
                if (name.equals("shopNameList")) {
                    var4 = 1;
                }
                break;
            case 1379209310:
                if (name.equals("services")) {
                    var4 = 0;
                }
                break;
            case 1792511340:
                if (name.equals("dateList")) {
                    var4 = 2;
                }
        }

        switch(var4) {
            case 0:
                this.setServices((List)value);
                return;
            case 1:
                this.setShopNameList((List)value);
                return;
            case 2:
                this.setDateList((List)value);
                return;
            case 3:
                this.setTimeList((List)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof BookingListData) ? false : this.signature().equals(((BookingListData)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean BookingListData has no signature defined, no hash code or equals possible.");
    }
}
